package com.lh.item.bo;

import com.lh.item.pojo.SkuDo;
import com.lh.item.pojo.SpuDetailDo;
import com.lh.item.pojo.SpuDo;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;
import java.util.List;

/**
 * 页面展示的是商品分类和品牌名称，而数据库中保存的是id,所以继承类，拓展中文字段
 */
@Getter
@Setter
@NoArgsConstructor
public class SpuBo extends SpuDo {

    /**
     * 商品分类名称
     */
    private String cname;

    /**
     * 品牌名称
     */
    private String bname;

    private SpuDetailDo spuDetailDo;

    private List<SkuDo> skus;

    public SpuBo(Long brandId, Long cid1, Long cid2, Long cid3, String title, String subTitle, Boolean saleable, Boolean valid, Date createTime, Date lastUpdateTime) {
        this.brandId = brandId;
        this.cid1 = cid1;
        this.cid2 = cid2;
        this.cid3 = cid3;
        this.title = title;
        this.subTitle = subTitle;
        this.saleable = saleable;
        this.valid = valid;
        this.createTime = createTime;
        this.lastUpdateTime = lastUpdateTime;
    }
}
